<!--代码逻辑和样式库-->
<script src="./view-authorized-personnel.component.js"></script>
<style src="./view-authorized-personnel.scss" scoped lang="scss"></style>

<template>
  <div>
    <el-dialog :title="title" :visible.sync="showDialog" width="80%" @close="closeDialog()">
      <!--用户列表table-->
      <el-row>
        <el-col :span="5">
          <el-tree class="filter-tree" :data="structuresTreeData" :props="defaultProps" :filter-node-method="filterNode" @node-click="handleNodeClick" accordion node-key="id" ref="departmentTree">
          </el-tree>
        </el-col>
        <el-col :span="19">
          <!--用户列表table-->
          <el-table v-loading="loading" :data="data" border fit>
            <el-table-column type="index" :index="setIndex" label="序号" width="55" />
            <el-table-column prop="userName" label="用户编号" width="200" />
            <el-table-column prop="trueName" label="用户姓名" width="200" />
            <el-table-column prop="mobileNumberMask" label="手机号码" width="200" />
            <el-table-column prop="sex" label="性别" width="100" />
            <el-table-column prop="structCode" label="部门编码" width="200" />
            <el-table-column prop="structName" label="所属部门" width="200" />
            <el-table-column prop="roleNames" label="职位" width="200" />
            <el-table-column label="账号状态" width="100" align="center">
              <template slot-scope="scope">
                <el-switch v-model="scope.row.isEnable" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" disabled></el-switch>
              </template>
            </el-table-column>
          </el-table>
          <!-- 分页插件 -->
          <pagination class="pagination" v-show="totalNum > 0" :total="totalNum" :page.sync="pageNum" :limit.sync="recordNum" @pagination="getDataList" />
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="showDialog = false">关闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>
